package com.xl.event.publish;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationEventPublisher;
import org.springframework.stereotype.Component;

@Component
public class AlarmEventPublisher {

    //直接调用系统发布者发布消息
    @Autowired
    private ApplicationEventPublisher publisher;

    public void publish(ApplicationEvent applicationEvent) {
        publisher.publishEvent(applicationEvent);
    }

}
